package com.springmvc.platform.shiro.controller;

import com.springmvc.platform.manage.service.SysResourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author zhouhong
 * @create 2017/10/3
 * @modify
 */
@Controller
@RequestMapping("")
public class IndexController {
    @Autowired
    private SysResourceService sysResourceService;
    //跳转后台首页
    @RequestMapping(value = "index",method = RequestMethod.GET)
    public String index(ModelMap map){
        map.addAttribute("resource",sysResourceService.queryAllResource());
        return "index/index";
    }

    @RequestMapping(value = "",method = RequestMethod.GET)
    public String index2(ModelMap map){
        map.addAttribute("resource",sysResourceService.queryAllResource());
        return "index/index";
    }

    @RequestMapping(value = "indexTab",method = RequestMethod.GET)
    public String indexTab(){
        return "index/indexTab";
    }
}
